package edu.nf.aiexam.service;


import edu.nf.aiexam.common.exception.LoginException;
import edu.nf.aiexam.entity.User;
import org.springframework.stereotype.Service;

/**
 * @author wangl
 * @date 2025/4/16
 */
@Service
public class LoginService {

    public User auth(String account, String password) {
        if("wangl".equals(account) && "123".equals(password)) {
            User user = new User();
            user.setUserName("wangl");
            return user;
        }
        throw new LoginException(10000, "账号或密码错误");
    }
}